<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!-- 
	Copyright (C) 2007, 2008, 2009, 2010, 2011. PARP Research Group.
	<http://perception.inf.um.es>
	University of Murcia, Spain.

	This file is part of the QVision library.

	QVision is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as
	published by the Free Software Foundation, version 3 of the License.

	QVision is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with QVision. If not, see <http://www.gnu.org/licenses/>.
-->

<html><head><meta http-equiv="content-Type" content="text/html;charset=UTF-8">
<title>QVision: Qt&#39;s Image, Video and Computer Vision Library</title>
<meta name="title" content="QVision" />
<meta name="dc.title" content="QVision" />
<meta name="url" content="http://perception.inf.um.es/QVision" />
<meta name="author" content="PARP Research Group - http://perception.inf.um.es" />
<meta name="revisit-after" content="30 DAYS"/>
<meta name="robots" content="index,follow"/>
<meta name="classification" content="*">
<meta name="rating" content="Safe For Kids">
<meta name="distribution" content="GLOBAL"/>
<meta name="description" content="Qt's Image, Video and Computer Vision Library"/>
<meta name="page-topic" content="Computer Vision research and prototype programming"/>
<meta name="geo.country" content="ES" />

<!--
Keywords:
By license:		open source, gnu, lgpl, gpl, free
By theme:		computer vision, image processing, robotics, programming, source, development
By usage:		library, toolkit, framework, prototype, application
By programming specs:	object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping
Interoperability with:	Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack
Functionallity:		image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface
Main data-types:	matrix, vector, tensor, quaternion, image, polyline
Video sources:		webcam, camera, stream
Devices:		embedded, desktop computer, laptop, mini-laptop
Authors:		PARP research group. University of Murcia, Spain.
-->

<meta name="keywords" content="augmented reality, sfm, structure from motion, open source, gnu, lgpl, gpl, free, computer vision, image processing, robotics, programming, source, development, library, toolkit, framework, prototype, application, object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping, Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack, image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface, matrix, vector, tensor, quaternion, image, polyline, webcam, camera, stream, embedded, desktop computer, laptop, mini-laptop, University of Murcia, Spain, PARP research group, vision por computador"/>
<meta http-equiv="keywords" content="augmented reality, sfm, structure from motion, open source, gnu, lgpl, gpl, free, computer vision, image processing, robotics, programming, source, development, library, toolkit, framework, prototype, application, object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping, Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack, image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface, matrix, vector, tensor, quaternion, image, polyline, webcam, camera, stream, embedded, desktop computer, laptop, mini-laptop, University of Murcia, Spain, PARP research group, vision por computador"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="title" content="QVision"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
</head><body>

<table width="100%"><tr>
	<td><a href="http://perception.inf.um.es/"><img src="parp.png" border="0" /> <big>PARP Research Group</big></a></td>
	<td align="right"><a href="http://www.um.es/"><big>Universidad de Murcia</big> <img src="um.png" border="0" /></a></td>
</tr></table>

<hr /><br />

<table width="95%" align="center"><tr><td>

<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <form id="FSearchBox" action="search.php" method="get">
            <img id="MSearchSelect" src="search/search.png" alt=""/>
            <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                   onfocus="searchBox.OnSearchFieldFocus(true)" 
                   onblur="searchBox.OnSearchFieldFocus(false)"/>
          </form>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>ROS wrapper functions</h1>
<p>Functionality related to the <a href="http://www.ros.org/wiki/">ROS</a> development package.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qvros.html#gad93da3ae76d4c1cebbdd6b7dbd29d662">sSBAOptimization</a> (const QList&lt; <a class="el" href="classQVCameraPose.html">QVCameraPose</a> &gt; &amp;cameraPoses, const QList&lt; <a class="el" href="classQV3DPointF.html">QV3DPointF</a> &gt; &amp;points3D, const QList&lt; QHash&lt; int, QPointF &gt; &gt; &amp;pointsProjections, QList&lt; <a class="el" href="classQVCameraPose.html">QVCameraPose</a> &gt; &amp;refinedCameraPoses, QList&lt; <a class="el" href="classQV3DPointF.html">QV3DPointF</a> &gt; &amp;refinedPoints3D, int &amp;time_sSBA, const int numIters=1, const double lambda=1e-3, const int useCSparse=SBA_SPARSE_CHOLESKY, const int numFixedCameras=1, double initTolCG=1.0e-8, const int maxItersCG=100)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Apply sSBA optimization on a SfM reconstruction.  <a href="#gad93da3ae76d4c1cebbdd6b7dbd29d662"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Functionality related to the <a href="http://www.ros.org/wiki/">ROS</a> development package. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gad93da3ae76d4c1cebbdd6b7dbd29d662"></a><!-- doxytag: member="qvssba.h::sSBAOptimization" ref="gad93da3ae76d4c1cebbdd6b7dbd29d662" args="(const QList&lt; QVCameraPose &gt; &amp;cameraPoses, const QList&lt; QV3DPointF &gt; &amp;points3D, const QList&lt; QHash&lt; int, QPointF &gt; &gt; &amp;pointsProjections, QList&lt; QVCameraPose &gt; &amp;refinedCameraPoses, QList&lt; QV3DPointF &gt; &amp;refinedPoints3D, int &amp;time_sSBA, const int numIters=1, const double lambda=1e&#45;3, const int useCSparse=SBA_SPARSE_CHOLESKY, const int numFixedCameras=1, double initTolCG=1.0e&#45;8, const int maxItersCG=100)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sSBAOptimization </td>
          <td>(</td>
          <td class="paramtype">const QList&lt; <a class="el" href="classQVCameraPose.html">QVCameraPose</a> &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>cameraPoses</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QList&lt; <a class="el" href="classQV3DPointF.html">QV3DPointF</a> &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>points3D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QList&lt; QHash&lt; int, QPointF &gt; &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>pointsProjections</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QList&lt; <a class="el" href="classQVCameraPose.html">QVCameraPose</a> &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>refinedCameraPoses</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QList&lt; <a class="el" href="classQV3DPointF.html">QV3DPointF</a> &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>refinedPoints3D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>time_sSBA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&nbsp;</td>
          <td class="paramname"> <em>numIters</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&nbsp;</td>
          <td class="paramname"> <em>lambda</em> = <code>1e-3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&nbsp;</td>
          <td class="paramname"> <em>useCSparse</em> = <code>SBA_SPARSE_CHOLESKY</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&nbsp;</td>
          <td class="paramname"> <em>numFixedCameras</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>initTolCG</em> = <code>1.0e-8</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&nbsp;</td>
          <td class="paramname"> <em>maxItersCG</em> = <code>100</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Apply sSBA optimization on a SfM reconstruction. </p>
<p>This is a wrapper function for the sparse bundle adjustment functionality provided by the <a href="http://www.ros.org/wiki/Documentation">ROS package</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cameras</em>&nbsp;</td><td>Initial camera poses for the initial reconstruction. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>points3D</em>&nbsp;</td><td>Initial 3D point locations. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pointProjections</em>&nbsp;</td><td>Projections for points in the reconstruction. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>refinedCameras</em>&nbsp;</td><td>Camera poses after SBA optimization. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>refinedPoints3D</em>&nbsp;</td><td>3D point coordinates after the optimization. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>time_sSBA</em>&nbsp;</td><td>Time spend on the SBA optimization. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>numIters</em>&nbsp;</td><td>Number of iterations to perform LM. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>lambda</em>&nbsp;</td><td>Inital damping factor for LM. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>numFixedPoints</em>&nbsp;</td><td>Number of fixed 3D points in the reconstruction, to perform local bundle adjustment.</td></tr>
  </table>
  </dd>
</dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000092">Todo:</a></b></dt><dd>Document this. </dd></dl>

<p>Definition at line <a class="el" href="qvssba_8cpp_source.html#l00182">182</a> of file <a class="el" href="qvssba_8cpp_source.html">qvssba.cpp</a>.</p>

</div>
</div>
</div>
</td></tr></table>

<br /><hr><br />
<center><a href="http://perception.inf.um.es/QVision">QVision framework</a>.
<a href="http://perception.inf.um.es">PARP research group</a>.
Copyright &copy; 2007, 2008, 2009, 2010, 2011.</center>
<br />
</body>
</html>
